// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/libs/request';

// 报表列表
export function getReportingList(data) {
  return request({
    url: 'report/report',
    method: 'get',
    params: data,
  });
}

// 新增或编辑报表
export function setReporting(data) {
  return request({
    url: data.url,
    method: data.method,
    data: data.datas,
  });
}

// 报表详情
export function getReportingDetail(id) {
  return request({
    url: `report/report/${id}`,
    method: 'get',
  });
}

// 服务类型列表
export function getServiceType() {
  return request({
    url: 'report/serviceTypeList',
    method: 'get',
  });
}

// 服务类型详情
export function getServiceTypeDetail(data) {
  return request({
    url: 'report/serviceTypeDetail',
    method: 'get',
    params: data,
  });
}

// 服务科目列表
export function getServiceSubject(data) {
  return request({
    url: 'report/serviceSubjectList',
    method: 'get',
    params: data,
  });
}

// 用户列表
export function getUserList(data) {
  return request({
    url: 'report/userList',
    method: 'get',
    params: data
  });
}

// 装备列表
export function getEquipmentList(data) {
  return request({
    url: 'task/equipmentList',
    method: 'get',
    params: data
  });
}

// 装备列表(动态添加DOM使用)
export function getEquipList(data) {
  return request({
    url: 'task/equipList',
    method: 'get',
    params: data
  });
}

// 车辆列表
export function getCarList(data) {
  return request({
    url: 'task/carList',
    method: 'get',
    params: data
  });
}